<%-- 
    Document   : w_updateOrderStatus
    Created on : Dec 20, 2013, 4:27:53 PM
    Author     : Trang
--%>
<%@page import="database.SupplierDAO"%>
<%@page import="model.Supplier"%>
<%@page import="model.Role"%>
<%@page import="model.Staff"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
    <style>
        .toggler { width: 500px; height: 200px; }
    </style>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Update Status</title>
        <link href="<%= request.getContextPath()%>/css/style_for_page.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_warehousing.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_menu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_addtion.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/adMenu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/tHeaderFooter.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
        <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
        <link rel="stylesheet" href="/resources/demos/style.css" />  
    </head>

    <% int i = 0;%>   
    <body style="background-color: lightsteelblue;">
        <div class="headerbg">
            <div class="header"> 
                <%@include file="/include/mHeader.jsp" %>
            </div>
            <div class="adContent">
                <div class="adMenu">
                    <%@include file="/include/mMenu.jsp" %>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="content2">
                <div class="registerbg">
                    <div class="registerForm" style="background-color: white;">
                         
                                <table>
                                    <tr>
                                         
                                        <td><b>Customer Name: </b></td>
                                        <td> <s:property value="order.customer.firstName +' '+order.customer.lastName"/></td> 
                                    </tr>
                                    <tr>
                                        <td><b>Address:</b></td>
                                        <td><s:property value="order.customer.address" /></td>
                                    </tr>
                                    <tr>
                                        <td><b>Phone Number:</b></td>
                                        <td><s:property value="order.customer.phone" /></td>
                                    </tr>
                                    <tr>
                                        <td><b>Create Order Date: </b></td>
                                        <td><s:property value="order.createTime" /></td>
                                        <s:hidden name="hidenID"/>
                                    </tr>
                                    <tr>
                                        <td><b>Current Status: </b></td>
                                        <td><s:property value="order.orderStatus" /></td>  
                                    </tr>
                                     <s:form theme="simple" action="update" namespace="/Administration/Issue">
                                     <tr>
                                         <s:hidden name="hidenID"/>
                                         <td><b>New status: </b></td>
                                         <td><s:select name="fill" cssStyle="width: 200px" list="fills" theme="simple"/></td>  
                                    </tr>
                                    <tr>
                                        <td>
                                            
                                                
                                                 <s:submit  value="Edit" cssStyle="width: 100px; background-color: gray;" theme="simple" title="Edit Status"/> 
                                            
                                        </td>
                                         
                                    </tr>
                                     </s:form>
                                </table>
                            </div>
                </div>
                <div class="registerbg" >           
                                     
                        <div class="registerTermsVertical">
                            <h4 style=" margin-top: 15px; margin-bottom: 10px">  Detail Item In Issue</h4> 
                             <div class="datagrid">
                                <table>
                                    <thead>
                                        <tr>
                                            <th> No </th> 
                                            <th>Product Name</th>
                                            <th>Product Brand</th>
                                            <th>Product Stock Quantity</th>
                                            <th>Order Quantity</th>
                                            <th>Unit Price</th>
                                            <th>Total Price</th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                    <form name="fom" method="post"> 

                                        <s:iterator value="orderitems">
                                            <% i++;%>
                                            <tr> 
                                                <td><%out.print(i);%></td>
                                                <td><s:property value="product.name"/></td>
                                                <td><s:property value="product.brand"/></td>
                                                <td><s:property value="product.stockQuantity"/></td>
                                                <td><s:property value="orderQuantity"/></td>
                                                <td><s:property value="orderPrice"/></td>  
                                                <td><s:property value="orderQuantity * orderPrice"/></td>
                                            </tr>       
                                        </s:iterator>
                                        <tr style="color: #FFFFFF;font-style: italic;font-weight: 500 ">
                                            <td>Total Amount</td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td><s:property value="%{order.totalAmount}"/></td>  
                                        </tr>
                                    </form>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                </div>
            </div>
        </div>
        <footer>
            <div id="footer">
                <%@include file="/include/iFooter.jsp" %>
            </div>   
        </footer>

    </body>
</html>


